<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:42:04
 * @Description: 活动，就是把商品集合起来，没其他用处
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-19 18:19:37
 * @FilePath: /归档/expand/2021_10_19_104204_create_topic.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTopic extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('topics', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->string('title', 100)->comment('活动名称');
            $table->string('desc', 255)->comment('描述');
            $table->string('thumb', 255)->comment('封面图');
            $table->text('content')->comment('详情');
            $table->dateTime('lasttime')->default('2021-10-10 00:00:00')->comment('上架时间');
            $table->dateTime('lowertime')->default('2021-10-10 00:00:00')->comment('下架时间');
            $table->integer('sort')->default(0)->comment('排序 升序');
            $table->boolean('status')->default(1)->comment('状态（1上架  0下架）');
            $table->tinyInteger('del_flag')->default(0)->comment('删除状态（1删除 0正常）');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('topics');
    }
}
